/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.view;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.widget.FrameLayout.LayoutParams;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.ScrollView;
import android.widget.TextView;
import com.qihoo.gamecenter.sdk.common.d.a;
import com.qihoo.gamecenter.sdk.common.d.a.a;
import com.qihoo.gamecenter.sdk.common.i.s;
import com.qihoo.gamecenter.sdk.pay.component.APayWidget;
import com.qihoo.gamecenter.sdk.pay.k.c;
import com.qihoo.gamecenter.sdk.pay.k.d;
import com.qihoo.gamecenter.sdk.pay.res.b;

public class SubmitedOrderView extends APayWidget {
    private TextView c;
    private LinearLayout d;
    private LinearLayout e;
    private Intent f;
    private Activity g;
    private int h;

    private SubmitedOrderView(Context paramContext) {
        super(paramContext);
    }

    public SubmitedOrderView(Activity paramActivity, Intent paramIntent) {
        this(paramActivity);
        this.f = paramIntent;
        this.g = paramActivity;
    }

    public void a(int paramInt) {
        this.h = paramInt;
        b();
    }

    private void b() {
        setVisibility(8);
        ScrollView localScrollView = new ScrollView(this.g);
        localScrollView.setFillViewport(true);
        localScrollView.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
        addView(localScrollView);
        int i = 0;
        int j = 0;
        if (this.h == 65282)
            i = s.b(this.g, 80.0F);
        else
            i = s.b(this.g, 20.0F);
        j = s.b(this.g, 20.0F);
        this.e = new LinearLayout(this.g);
        this.e.setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
        this.e.setOrientation(1);
        this.e.setGravity(1);
        this.e.setPadding(i, j, i, j);
        localScrollView.addView(this.e);
        c();
    }

    private void c() {
        LinearLayout localLinearLayout1 = new LinearLayout(this.g);
        localLinearLayout1.setLayoutParams(new LinearLayout.LayoutParams(-2, 0, 1.0F));
        localLinearLayout1.setOrientation(1);
        this.e.addView(localLinearLayout1);
        LinearLayout localLinearLayout2 = new LinearLayout(this.g);
        localLinearLayout2.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localLinearLayout2.setGravity(16);
        localLinearLayout2.setOrientation(0);
        localLinearLayout1.addView(localLinearLayout2);
        ImageView localImageView = new ImageView(this.g);
        localImageView.setLayoutParams(new RelativeLayout.LayoutParams(s.b(this.g, 25.0F), s.b(this.g, 25.0F)));
        localImageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
        localImageView.setBackgroundDrawable(this.b.a(1073741917));
        localLinearLayout2.addView(localImageView);
        LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(-2, -2);
        localLayoutParams1.leftMargin = s.b(this.g, 8.0F);
        TextView localTextView1 = new TextView(this.g);
        localTextView1.setLayoutParams(localLayoutParams1);
        localTextView1.setText(a.a(a.a.ac));
        localTextView1.setTextColor(-16777216);
        localTextView1.setTextSize(1, s.a(this.g, 16.0F));
        localLinearLayout2.addView(localTextView1);
        LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(-2, -2);
        localLayoutParams2.topMargin = s.b(this.g, 15.0F);
        this.d = new LinearLayout(this.g);
        this.d.setLayoutParams(localLayoutParams2);
        localLinearLayout1.addView(this.d);
        LinearLayout.LayoutParams localLayoutParams3 = new LinearLayout.LayoutParams(-2, -2);
        localLayoutParams3.leftMargin = s.b(this.g, 35.0F);
        TextView localTextView2 = new TextView(this.g);
        localTextView2.setLayoutParams(localLayoutParams3);
        localTextView2.setTextSize(1, s.a(this.g, 13.3F));
        localTextView2.setTextColor(-11842745);
        localTextView2.setText(a.a(a.a.al));
        this.d.addView(localTextView2);
        this.c = new TextView(this.g);
        this.c.setTextSize(1, s.a(this.g, 13.3F));
        this.c.setTextColor(-39424);
        this.d.addView(this.c);
        TextView localTextView3 = new TextView(this.g);
        localTextView3.setLayoutParams(localLayoutParams2);
        localTextView3.setTextSize(1, s.a(this.g, 13.3F));
        localTextView3.setTextColor(-11842745);
        localTextView3.setText(a.a(a.a.ae));
        localLinearLayout1.addView(localTextView3);
    }

    public void setChangeUi(String paramString1, String paramString2, String paramString3) {
        try {
            if ("none".equals(paramString3)) {
                this.d.setVisibility(8);
            }
            else {
                this.d.setVisibility(0);
                this.c.setText(paramString3);
            }
            d.a(this.g, paramString1);
            d.b(this.g, paramString2);
        } catch (Exception localException) {
            c.c("SubmitedOrderView", new Object[] { localException.toString() });
            c.a("SubmitedOrderView", new Object[] { "setChangeUi exception" });
        }
    }

    public void a() {
        setVisibility(0);
    }
}